<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ taglib prefix="limits" uri="/WEB-INF/tld/limits.tld"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>行业客户详情</title>
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/defalut.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/public.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/ddspstyle.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/icon.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/WdatePicker/skin/WdatePicker.css">
<script type="text/javascript" src="../../static/js/jquery.min.js"></script>
<script type="text/javascript" src="../../static/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../static/js/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../static/js/jquery.validate.js"></script>
<script type="text/javascript" src="../../static/js/index.js"></script>
<script type="text/javascript" src="../../static/js/WdatePicker/WdatePicker.js"></script>
<script type="text/javascript" charset="utf-8" src="../../ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../../ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../../ueditor/lang/zh-cn/zh-cn.js"></script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<%
	String para =request.getParameter("f_po_id");
	int f_po_id = 0;
	if(para != null)
		f_po_id = Integer.valueOf(para);
%>
<script type="text/javascript">
	$(function() {
		$("#prov").val(11);
		var f_po_id = <%=f_po_id%>;
		$.ajax({
			url:"../../pms/org_select.do?f_po_id="+f_po_id,
			success:function(data) {
				data = JSON.parse(data);
				$("#f_po_id").html(data.f_po_id);
				$("#f_po_name").html(data.f_po_name);
				$("#f_po_desc").html(data.f_po_desc);
				
				
				var industry = "未知";
				switch(data.f_po_industry) {
					case 1: case "1": industry = "酒店"; break;
					case 2: case "2": industry = "政企"; break;
					case 3: case "3": industry = "休闲"; break;
					case 4: case "4": industry = "学校"; break;
					case 5: case "5": industry = "医疗"; break;
					case 6: case "6": industry = "监狱"; break;
					case 7: case "7": industry = "党建"; break;
					case 8: case "8": industry = "党政军"; break;
					case 9: case "9": industry = "公司"; break;
					case 10: case "10": industry = "测试"; break;
				}
				
				$("#f_po_industry").html(industry);
				
				
				var platform_attr = "未知";
				switch(data.f_po_platform_attr) {
					case 1: case "1": platform_attr = "个性化"; break;
					case 2: case "2": platform_attr = "农村"; break;
					case 3: case "3": platform_attr = "校园"; break;
					case 4: case "4": platform_attr = "酒店"; break;
					case 5: case "5": platform_attr = "增值"; break;
				}
				
				$("#f_po_platform_attr").html(platform_attr);
				
				$("#f_po_model_name").html(data.f_po_model_name);
				$("#f_po_live_url").html(data.f_po_live_url);
				
				
				var channel_difinition = "未知";
				switch(data.f_po_channel_difinition) {
					case 0: case "0": channel_difinition = "标清"; break;
					case 1: case "1": channel_difinition = "准高清"; break;
					case 2: case "2": channel_difinition = "高清"; break;
				}
				
				$("#f_po_channel_difinition").html(channel_difinition);
				
				
				var platform_type = "未知";
				switch(data.f_po_platform_type) {
					case 0: case "0": platform_type = "华为"; break;
					case 1: case "1": platform_type = "UT"; break;
				}
				
				$("#f_po_platform_type").html(platform_type);
				
				$("#f_po_default_channel").html(data.f_po_default_channel);
				
				
				var model_index_conf = "未知";
				switch(data.f_po_model_index_conf) {
					case 1: case "1": model_index_conf = "直播频道"; break;
					case 2: case "2": model_index_conf = "点播视频"; break;
					case 3: case "3": model_index_conf = "图片轮播"; break;
				}
				
				$("#f_po_model_index_conf").html(model_index_conf);
				if(data.f_po_type=="hd"){
					$("#f_po_type").html("高清");
				}else if(data.f_po_type=="sd"){
					$("#f_po_type").html("标清");
				}else{
					$("#f_po_type").html("无");
				}
				if(data.f_po_address){
					var areaArr = data.f_po_address.split("-");
					var wholeAddress = "";
					if(areaArr[0]) {
						wholeAddress += provice[areaArr[0]].name;
						if(areaArr[1]) {
							wholeAddress += provice[areaArr[0]]["city"][areaArr[1]].name;
							if(areaArr[2]) {
								wholeAddress += provice[areaArr[0]]["city"][areaArr[1]]["districtAndCounty"][areaArr[2]];
							}
						}
					}
					$("#f_po_address").html(wholeAddress);
				}
				var result ="";
				switch(data.f_po_status) {
					case 1: 
						result = "上线";
						$("#review_dialog").hide();
						break;
					case 2: 
						result = "无效";
						$("#review_dialog").hide();
						break;
					case 5: 
						result = "待审批";
						break;
					case 6: 
						result = "审批不通过";
						break;
					default: 
						break;
				}
				$("#f_po_status").html(result);
			}
		});
		
		$('#review_dialog').find(".review_pass").on("click", function(){
			$.ajax({
				url:"../../pms/update_org_status.do",
				data: {
					f_po_id : f_po_id,
					f_po_status : 1
				},
				dataType: "json",
				type: "POST",
				success:function(data) {
					if(data.success){
						$.messager.alert("操作提示","审批成功!","info",function(){
							parent.$('#dlg').dialog('close');
							parent.gotoSearch($('#easyui-treegrid'));
						});
					} else {
						$.messager.alert("操作提示","审批失败!","error");
					}
				}
			});
		});
		
		$('#review_dialog').find(".review_unpass").on("click", function(){
			$.ajax({
				url:"../../pms/update_org_status.do",
				data: {
					f_po_id : f_po_id,
					f_po_status : 6
				},
				dataType: "json",
				type: "POST",
				success:function(data) {
					if(data.success){
						$.messager.alert("操作提示","审批成功!","info",function(){
							parent.$('#dlg').dialog('close');
							parent.gotoSearch($('#easyui-treegrid'));
						});
					} else {
						$.messager.alert("操作提示","审批失败!","error");
					}
				}
			});
		});

		
	});
	
</script>
<style type="text/css">
</style>
</head>

<body class="overfwidth">
	<div class="barnavtop">您所在的位置：行业客户管理 &gt; 行业客户详情</div>
	<div id="workspace">
		<!--主体 开始-->
		<div id="container-1">
			<div class="editspace">
				<form id="contentForm" class="cmxform" enctype="multipart/form-data" name="formName">
					<input type="hidden" id="f_po_id" name="f_po_id" value=""/>
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										&nbsp;客户名称:
										<font id="f_po_name" style="width: 150px;"></font>
									</td>
									<td width="10%" align="left">
										模版名称:
										<font id="f_po_model_name" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										&nbsp;地区:
										<font id="f_po_address" style="width: 150px;"></font>
									</td>
									<td width="10%" align="left">
										客户所属行业:
										<font id="f_po_industry" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										&nbsp;平台属性:
										<font id="f_po_platform_attr" style="width: 150px;"></font>
									</td>
									<td width="10%" align="left">
										直播地址:
										<font id="f_po_live_url" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										&nbsp;虚拟频道清晰度:
										<font id="f_po_channel_difinition" style="width: 150px;"></font>
									</td>
									<td width="10%" align="left">
										平台类型:
										<font id="f_po_platform_type" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										<jsp:include page="../../pictures/pictures_info_industry.jsp" flush="true">
											<jsp:param value="组织" name="picType"/>
											<jsp:param value="<%=f_po_id %>" name="f_cp_relationid"/>
										</jsp:include>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										&nbsp;描述:
										<font id="f_po_desc" style="width: 700px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										&nbsp;默认频道:
										<font id="f_po_default_channel" style="width: 150px;"></font>
									</td>
									<td width="10%" align="left">
										模板首页设置:
										<font id="f_po_model_index_conf" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										&nbsp;宽带电视类型:
										<font id="f_po_type" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="15%" align="left">
										&nbsp;状态:
										<font id="f_po_status" style="width: 150px;"></font>
									</td>	
									<td id="review_dialog" width="80%" align="left">
										<limits:uiAuth url="update_org_status.do">
										<a href="#" class="easyui-linkbutton review_pass" iconCls="icon-ok">审批通过</a>
										</limits:uiAuth>
										
										<limits:uiAuth url="update_org_status.do">
										<a href="#" class="easyui-linkbutton review_unpass" iconCls="icon-cancel">审批不通过</a>
										</limits:uiAuth>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<div class="toolbar" style="text-align: center;">
					<a href="javascript:void(0);" data-options="iconCls:'icon-cancel'"
							class="easyui-linkbutton"
							onclick="javascript:parent.$('#dlg').dialog('close')">关闭</a>
					</div>
				</form>
			</div>
		</div>
		<!--主体 结束-->
		
		
	</div>
	<div id="cast_list" class="easyui-dialog"
		style="width: 600px; height: 470px; padding-top: 0px;"
		data-options="title:'模型选择', iconCls:'icon-save',modal:true,closed:true,buttons:'#dlg_buttons'">
		<iframe scrolling="auto" frameborder="0"
			style="width: 100%; height: 99%;"></iframe>
	</div>
	<div id="model_list" class="easyui-dialog"
		style="width: 600px; height: 470px; padding-top: 0px;"
		data-options="title:'模版选择', iconCls:'icon-save',modal:true,closed:true,buttons:'#dlg_buttons'">
		<iframe scrolling="auto" frameborder="0"
			style="width: 100%; height: 99%;"></iframe>
	</div>
	<div id="dlg" class="easyui-dialog"
		style="width: 800px; height: 500px; padding-top: 0px;"
		data-options="title:'企业管理', iconCls:'icon-save',modal:true,closed:true,buttons:'#dlg_buttons'">
		<iframe scrolling="auto" frameborder="0"
			style="width: 100%; height: 99%;"></iframe>
	</div>
	<script type="text/javascript" src="../../static/js/city/city.js"></script>
	<script type="text/javascript" src="../../static/js/city/method01.js"></script>
</body>
</html>
